// 使用md5进行将用户密码进行加密
// const md5 = require('md5');
// console.log(md5('message'));


//测试将密码加密之后存贮
const {addAdmin,updateAdmin,loginStrict} = require("./services/adminService");

async function testaddAdmin(){
   const resp =  await addAdmin({
        loginId:'admin',
        loginPwd:'123123',
        name:'dudu'
    }) 
    console.log(resp) 
}
// testaddAdmin()

// 修改admin2这个账户的密码为123456

async function testupdateAdmin(){
    const ins = await updateAdmin(3,{
        loginPwd:'123456'
    })
    console.log(ins)
}
// testupdateAdmin()

// 测试登录验证

async function testloginStrict(){
    const ins = await loginStrict('admin2','123456')
    console.log(ins)
}
testloginStrict()